package net.csdn.business.auth.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import net.csdn.business.auth.serializer.CloudAuth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

/**
 * @Desc: 
 * @ClassName: MethodNotAllowedException
 * @Author: yourleige@163.com
 * @Date: 2022/11/7 19:02
 */
@JsonSerialize(using = CloudAuth2ExceptionSerializer.class)
public class MethodNotAllowedException extends CloudAuth2Exception {

	public MethodNotAllowedException(String msg, Throwable t) {
		super(msg);
	}

	@Override
	public String getOAuth2ErrorCode() {
		return "method_not_allowed";
	}

	@Override
	public int getHttpErrorCode() {
		return HttpStatus.METHOD_NOT_ALLOWED.value();
	}

}
